WA List Message
| Objects | |
|---|---|
| Title | String |
| Required | A title for the message that is displayed near the products or choices. |
| Sections Required | Array of objects (List Section) List of ListSection objects containing choices to be presented in the list message. |
| Description | String This is an optional field, containing a description for the message |
| message_properties | Object Additional properties for the message. Required if sending a product |
| list message. |
JSON Object Parameter in Message_properties Object-
| Attribute | Description |
|---|---|
| catalog_id | String Required if sending a product list message. The ID of the catalog to which the products belong. |
| Menu | String Optional. Sets the text for the menu of a choice list message. |
Structure of Sections object—It consist of an Array in the below format-
| Attribute | Description |
|---|---|
| Title | String Optional parameter. Title for list section. |
| Items | Array of objects (List Item). |
Structure of Items object—It consist of an Array in the below format-
| Attribute | Description |
|---|---|
| item required | choice (object) or product (object) Item information. |
Choice Object details-
| Attribute | Description |
|---|---|
| title required | String Required parameter. Title for the choice item. |
| description | String Optional parameter. The description (or subtitle) of this choice item. |
| media- optional | Object (Media Message)- The media of this choice item.- Url String required Url to the media file. thumbnail_url String optional An optional parameter. Will be used where it is natively supported. |
| postback_data | String Optional parameter. Postback data that will be returned in the MO if the user selects this option. |
Sample Message Format-
{
"app_id": "01E9AHW7C686SN0HZ595BH1YYY",
"recipient": {
"identified_by": {
"channel_identities": [
{
"channel": "WHATSAPP",
"identity": "917764863625"
}
]
}
},
"message": {
"list_message": {
"title": "Choose your icecream flavor",
"description": "The best icecream in town!",
"sections": [
{
"title": "Fruit flavors",
"items": [
{
"choice": {
"title": "Strawberry",
"postback_data": "Strawberry postback"
}
},
{
"choice": {
"title": "Blueberry",
"postback_data": "Blueberry postback"
}
}
]
},
{
"title": "Other flavors",
"items": [
{
"choice": {
"title": "Chocolate",
"postback_data": "Chocolate postback"
}
},
{
"choice": {
"title": "Vanilla",
"postback_data": "Vanilla postback"
}
}
]
}
],
"message_properties": {
"menu": "Menu"
}
}
}
}